using System;

namespace App.Practice.Step01
{
   public class Demo
   {
      public static void Run()
      {
         Copier.Copy();
      }
   }

   internal static class Copier
   {
      // Write a program that copies characters from the keyboard to the printer
      public static void Copy()
      {
         char c;
         while (Char.ToLower(c = Keyboard.Read()) != 'x')
            Printer.Write(c);
      }
   }

   internal static class Keyboard
   {
      public static char Read()
      {
         return Console.ReadKey().KeyChar;
      }
   }

   internal static class Printer
   {
      public static void Write(char c)
      {
         Console.Write(c);
      }
   }
}